{include file="common/header.tpl"}
<section class="main">
	<nav class="left-col">{include file="common/navi-system.tpl"}</nav>
    <article class="right-col">
    	<h2>Danh sách ROLE{if $AppUI->type > 1} &raquo; <a href="{$smarty.const.HOST_BACKEND}section/add">Thêm mới</a>{/if}</h2>
        <table width="100%" cellpadding="0" cellspacing="0" border="0" class="list">
            <thead>
                <tr>
                    <th class="firstChild">Code</th>
                    <th>Tên</th>
                    <th>Quyền sử dụng</th>
                    <th>Tình trạng</th>
                    {if $arrResult && $AppUI->type > 1}<th width="30">&nbsp;</th>{/if}
                </tr>
            </thead>
            <tbody>
                {if $arrResult}
                    {foreach item=item from=$arrResult}
                        <tr class="{cycle values="odd,even"}">
                            <td class="firstChild"><strong>{$item.code}</strong></td>
                            <td>{$item.name}</td>
                            <td>{$arrPermA[$item.perm_a]}{if $item.perm_a < 3}+{/if}</td>
                            <td>{if $item.enabled==1}Đang hoạt động{else}Tạm dừng{/if}</td>
                            {if $arrResult && $AppUI->type > 1}
                                <td align="center">
                                    <a href="{$smarty.const.HOST_BACKEND}section/edit?sectionid={$item.sectionid}">
                                        <img src="{$smarty.const.HOST_STATICS}backend/img/ad-edit.png" alt="Edit" border="0" width="16" height="16" />
                                    </a>
                                </td>
                            {/if}
                        </tr>
                    {/foreach}
                {/if}
            </tbody>
        </table>
        {if $arrResult}
            <div class="s-page">
                <div class="actionLink">
                    &nbsp;
                </div>
                {paging total=$intTotal limit=$intLimit offset=$intOffset}
            </div>
        {/if}
    </article>
</section>
{include file="common/footer.tpl"}
                
